import { Component, OnInit } from '@angular/core';
import {Service1Service} from '../../service/service1.service'
import {Hero} from '../../model/user.model'

@Component({
  selector: 'app-http',
  templateUrl: './http.component.html',
  styleUrls: ['./http.component.css']
})
export class HttpComponent implements OnInit {

  constructor(private service1:Service1Service) { }
  getUser():void {
    let bb  = this.service1.getuser1().subscribe(data => {
      console.log(data)
    })
  }
  getConfig():void {
    this.service1.getConfig().subscribe(data => {
      console.log(data)
    })
  }
  showConfig():void {
    let aa:Hero[]  = this.service1.getUsers()
    console.log(aa)
  }

  ngOnInit(): void {
  }

}
